<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
    <title>Document</title>
    <script src="fastclick.js"></script>
</head>

<body>
    <button>
        anniu
    </button>
    <script>
        if ('addEventListener' in document) {
            document.addEventListener('DOMContentLoaded', function () {
                FastClick.attach(document.body);
            }, false);
        }
        var btn = document.querySelector('button');
        btn.addEventListener('click', function () {
            console.log('click');
        });
        btn.addEventListener('touchend', function () {
            console.log('touch');
        })
    </script>
</body>

</html>